package com.xmy.cultivate.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.xmy.cultivate.entity.CancellationRate;
import com.xmy.cultivate.entity.Grade;
import com.xmy.cultivate.entity.Staff;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xmy.cultivate.entity.StaffStatusCount;
import com.xmy.cultivate.mapper.AdminMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 员工 服务类
 * </p>
 *
 * @author min
 * @since 2022-07-26
 */
public interface IStaffService extends IService<Staff> {

    public abstract boolean saveTo(Staff staff);

    public abstract boolean updateTo(Staff staff);

    public abstract Staff findOneById(Long id);

    public abstract IPage<Staff> findAll(IPage<?> page, Wrapper wrapper);

    public abstract List<Staff> getEnrollMemberList(String startDate, String endDate);

    Staff getOneForAdminid(Long adminId);

    /**
     * 通过登录账号获取教师id
     *
     * @param adminId
     * @return
     */
    Staff getStaffId(Long adminId);

    /**获取人事人员列表
     *
     */
    public List<Staff> getPersonnelList(String name);

    List<CancellationRate> getStaffStatusCountList(List yearClassId, List subjectsId);

    List<CancellationRate> getStaffStatusCountByFourSchoolList(List yearClassId, List subjectsId);

    List<CancellationRate> getStaffStatusCountByGradeList( List subjectsId);

    List<StaffStatusCount> getStaffStatusDetails(List yearClassId, List subjectsId,String schoolId, String status);

    List<StaffStatusCount> getStaffStatusGradeDetails (String yearClassId, List subjectsId, String status);

    public String getStaffNameById(Long id);

}
